package com.tudouji.project.produce.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.flow.service.pojo.BasePojo;
import com.flow.service.pojo.flow.FlowTempNode;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.framework.web.domain.BaseEntity;
import com.tudouji.project.harvest.domain.Qaform;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 入库申请单对象 whinapply
 *
 * @author tudouji
 * @date 2022-06-01
 */
@Data
public class Whinapply extends BasePojo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String guid;

    /**
     * 编号
     */
    @Excel(name = "编号")
    private String code;

    /**
     * 生产计划ID
     */
    @Excel(name = "生产计划ID")
    private String produceplanid;

    /**
     * 生产领料单ID
     */
    @Excel(name = "生产领料单ID")
    private String pickinglistid;

    /**
     * 库房guid
     */
    @Excel(name = "库房guid")
    private String srguid;

    /**
     * 状态:1-待质检,2-待入库,3-已入库
     */
    @Excel(name = "状态:1-待质检,2-待入库,3-已入库")
    private Integer status;

    /**
     * 公司ID，从生产计划单获取
     */
    @Excel(name = "公司ID，从生产计划单获取")
    private String orgguid;

    /**
     * 公司名称
     */
    @Excel(name = "公司名称")
    private String orgname;

    /**
     * 班组id
     */
    @Excel(name = "班组id")
    private String departid;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String operatorid;

    /**
     * 最后修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastupdate;

    /**
     * 1-成品入库,2-不合格入库
     */
    @Excel(name = "1-成品入库,2-不合格入库")
    private Integer type;

    /**
     * $column.columnComment
     */
    @Excel(name = "1-成品入库,2-不合格入库")
    private String flowid;

    private Integer[] stats;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    private List<Whinapplyitem> items;

    private String search;

    private String[] roomids;

    private String[] anddepids;

    private String[] androomids;

    private String keyword;

    private String planname;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planstart;

    private String pickcode;

    private Integer qastatus;

    private String qaoperatorname;

    private String statusName;

    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date qacreatedate;

    private Qaform qaform;

    private List<FlowTempNode> nodes;

    private Integer[] notStats;

    private Long deptId;

    private Long orgId;

    private Long strmId;

    private String deptName;

    private String strname;

    private String planCode;

    private String pickTypeName;

    public void prepareForProcess(){
        setBusTable("whinapply");
        setPlatformId(strmId);
    }

}
